Move mk-symlinks target into tools/Rules.mk.
authorcl349@firebug.cl.cam.ac.uk <cl349@firebug.cl.cam.ac.uk>
Mon, 28 Nov 2005 17:07:22 +0000 (18:07 +0100)
committercl349@firebug.cl.cam.ac.uk <cl349@firebug.cl.cam.ac.uk>
Mon, 28 Nov 2005 17:07:22 +0000 (18:07 +0100)
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
tools/Rules.mk
tools/blktap/Makefile
tools/libxc/Makefile
tools/security/Makefile

index b1c4a6d0044df25891062cca2fd7805574fafcfc..2a003b1d7a9063deb66747c729000313606a8a9f 100644 (file)
@@ -1,5 +1,8 @@
 #  -*- mode: Makefile; -*-
 
+# `all' is the default target
+all:
+
 include $(XEN_ROOT)/Config.mk
 
 XEN_XC             = $(XEN_ROOT)/tools/python/xen/lowlevel/xc
@@ -27,3 +30,13 @@ X11_LDPATH = -L/usr/X11R6/$(LIBDIR)
 
 %.o: %.cc
        $(CC) $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $<
+
+mk-symlinks: LINUX_ROOT=$(XEN_ROOT)/linux-2.6-xen-sparse
+mk-symlinks:
+       mkdir -p xen
+       ( cd xen && ln -sf ../$(XEN_ROOT)/xen/include/public/*.h . )
+       mkdir -p xen/io
+       ( cd xen/io && ln -sf ../../$(XEN_ROOT)/xen/include/public/io/*.h . )
+       mkdir -p xen/linux
+       ( cd xen/linux && \
+         ln -sf ../../$(LINUX_ROOT)/include/asm-xen/linux-public/*.h . )
index fab85d1adc3ac7ac2a1ad74142e2b318d2411a5a..d5d6f3eab33ad9fdd48db3cf982a98e027c643f1 100644 (file)
@@ -47,17 +47,6 @@ all: mk-symlinks libblktap.so #blkdump
                $(MAKE) -C $$subdir $@;       \
        done
 
-LINUX_ROOT := $(wildcard $(XEN_ROOT)/linux-2.6.*-xen-sparse)
-mk-symlinks:
-       [ -e xen/linux ] || mkdir -p xen/linux
-       [ -e xen/io ]    || mkdir -p xen/io
-       ( cd xen >/dev/null ; \
-         ln -sf ../$(XEN_ROOT)/xen/include/public/*.h . )
-       ( cd xen/io >/dev/null ; \
-          ln -sf ../../$(XEN_ROOT)/xen/include/public/io/*.h . )
-       ( cd xen/linux >/dev/null ; \
-         ln -sf ../../$(LINUX_ROOT)/include/asm-xen/linux-public/*.h . )
-
 install: all
        $(INSTALL_DIR) -p $(DESTDIR)/usr/$(LIBDIR)
        $(INSTALL_DIR) -p $(DESTDIR)/usr/include
index 08eb0c42a0f3bd755563615484d3a13f2714ef26..a077ad42e6a5266f4ec2e4401c917f75b7760eba 100644 (file)
@@ -83,17 +83,6 @@ check-for-zlib:
        false; \
        fi
 
-LINUX_ROOT := $(XEN_ROOT)/linux-2.6-xen-sparse
-mk-symlinks:
-       [ -e xen/linux ] || mkdir -p xen/linux
-       [ -e xen/io ]    || mkdir -p xen/io
-       ( cd xen >/dev/null ; \
-         ln -sf ../$(XEN_ROOT)/xen/include/public/*.h . )
-       ( cd xen/io >/dev/null ; \
-          ln -sf ../../$(XEN_ROOT)/xen/include/public/io/*.h . )
-       ( cd xen/linux >/dev/null ; \
-         ln -sf ../../$(LINUX_ROOT)/include/asm-xen/linux-public/*.h . )
-
 install: build
        [ -d $(DESTDIR)/usr/$(LIBDIR) ] || $(INSTALL_DIR) $(DESTDIR)/usr/$(LIBDIR)
        [ -d $(DESTDIR)/usr/include ] || $(INSTALL_DIR) $(DESTDIR)/usr/include
index 0d95a9b93f1957e67c199fd8c67422242ea9c451..80611835c3d1faf614a76892d87e3225457774fc 100644 (file)
@@ -69,14 +69,3 @@ $(POLICYFILE) : build
 boot_install: $(POLICYFILE)
        @cp $(POLICYFILE) /boot
        @./updategrub.sh $(POLICY) $(PWD)/$(XEN_ROOT)
-
-LINUX_ROOT := $(XEN_ROOT)/linux-2.6-xen-sparse
-mk-symlinks:
-       [ -e xen/linux ] || mkdir -p xen/linux
-       [ -e xen/io ]    || mkdir -p xen/io
-       ( cd xen >/dev/null ; \
-         ln -sf ../$(XEN_ROOT)/xen/include/public/*.h . )
-       ( cd xen/io >/dev/null ; \
-         ln -sf ../../$(XEN_ROOT)/xen/include/public/io/*.h . )
-       ( cd xen/linux >/dev/null ; \
-         ln -sf ../../$(LINUX_ROOT)/include/asm-xen/linux-public/*.h . )